package com.temple.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.temple.model.card.CardInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * Created with Intellij IDEA.
 * Description;
 * User:TQ02
 * Data:2024-09-12
 * Time:12:14
 * Text：
 */
@Mapper
public interface CardMapper extends BaseMapper<CardInfo> {
    @Select("SELECT COUNT(DISTINCT DATE(create_time)) FROM card_info WHERE card_cirid = #{templeId} AND card_title IS NULL;")
    long countDistinctCreateTimeByTempleId(int templeId);
}
